package com.dodo.blog.ui.component.input;

import com.dodo.blog.ui.component.HtmlComponent;

/**
 * @author <a href="mailto:pohorelec@comvai.com">Jozef Pohorelec</a>
 */
public class CheckBox
        extends InputComponent
{
    private static final long serialVersionUID = 1L;

    public CheckBox( String id )
    {
        super( id, InputType.CHECKBOX );
    }

    public HtmlComponent setValue( Object value )
    {
        if ( ( Boolean ) value )
        {
            setAttribute( Attribute.CHECKED );
        }

        return this;
    }
}
